{% extends 'base.html' %}
{% from 'bootstrap/form.html' import render_form %}

{% block title %}更新出租车{% endblock %}

{% block content %}
    <div class="container h-100">
        <div class="row h-100 page-header justify-content-center align-items-center">
            <h1>更新出租车</h1>
        </div>
        <div class="row h-100 justify-content-center align-items-center">
            <form action="" method="post" class="form col-6" role="form">
                <div class="form-group">
                    <label class="form-control-label" for="location">位置</label>
                    <input class="form-control" type="text" disabled="disabled" value="{{ car.location }}">
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="car_type">出租车类型</label>
                    <input class="form-control" type="text" disabled="disabled" value="{{ car.car_type }}">
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="total_cars">可用出租车数</label>
                    <input class="form-control" type="text" disabled="disabled" value="{{ car.avail_cars }}">
                </div>
            </form>
        </div>

        <div class="row h-100 justify-content-center align-items-center">
                <form action="" method="post" class="form col-6" role="form">
                    {{ form.csrf_token }}
                    <div class="form-group required">
                        <label class="form-control-label" for="total_cars">出租车总数</label>
                        <input class="form-control" id="total_cars" name="total_cars" required="" type="text" value="{{ car.total_cars }}">
                    </div>
                    <div class="form-group required">
                        <label class="form-control-label" for="price">价格</label>
                        <input class="form-control" id="price" name="price" required="" type="text" value="{{ car.price }}">
                    </div>
                    <input class="btn btn-primary btn-md" id="submit" name="submit" type="submit" value="更新">
                </form>
        </div>
    </div>
{% endblock %}

{% block footer %}{% endblock %}
